package com.hifar.test.api.model;

/**
 * 数据状态枚举
 */
public enum DataStatus {
    
    /**
     * 正常状态
     */
    NORMAL(1),
    
    /**
     * 删除状态
     */
    DELETED(0);
    
    private final Integer value;
    
    DataStatus(Integer value) {
        this.value = value;
    }
    
    public Integer getValue() {
        return value;
    }
    
    public static DataStatus fromValue(Integer value) {
        for (DataStatus status : DataStatus.values()) {
            if (status.getValue().equals(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Unknown data status: " + value);
    }
}
